//
//  SERegistrationCardCell.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/7/28.
//

import UIKit

protocol SERegistrationCardCellDelegate: NSObjectProtocol {
    func registrationCardCellCreateBtnAction()
}

class SERegistrationCardCell: UITableViewCell {

    @IBOutlet weak var memoLabel: UILabel!

    @IBOutlet weak var createBtn: UIButton! {
        didSet {
            createBtn.layer.cornerRadius = createBtn.size.height / 2.0
        }
    }

    @IBAction func createBtnAction(_ sender: UIButton) {
        delegate?.registrationCardCellCreateBtnAction()
    }

    weak var delegate: SERegistrationCardCellDelegate?

    func updateCellWithModel(_ viewModel: SERegistrationConfirmViewModel) {
        memoLabel.attributedText = viewModel.cardCreateStr
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
